package com.ihunanren.dao;


/**
 * 微信消息类型
 * @author kalman03
 */
public enum WeixinMsgType {

	TEXT("text"), IMAGE("image"), LOCATION("location"), LINK("link"), EVENT("event");

	private String value;

	private WeixinMsgType(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}

	public static WeixinMsgType get(String value) {
		for (WeixinMsgType msgType : WeixinMsgType.values()) {
			if (msgType.getValue().equals(value)) {
				return msgType;
			}
		}
		return null;
	}

	public static boolean isNormalMsg(WeixinMsgType msgType){
		return msgType != null && msgType != EVENT;
	}
}
